package a.f.l.a;

import a.c.e;
import a.d.t;

import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

class ac
  extends sb
{
  private int f;
  private e g;
  private e h;
  private t i;
  private t j;
  private a.f.c.h k;
  private boolean l;
  
  protected void c()
  {
    super.c();
    this.g = null;
    this.h = null;
    this.i = null;
    this.j = null;
    this.k = null;
  }
  
  protected void a(qb paramqb)
  {
    super.a(paramqb);
    this.k = paramqb.b();
  }
  
  protected void b(rb paramrb)
  {
    super.b(paramrb);
    this.g = paramrb.d().e();
    this.h = paramrb.d().f();
    this.i = paramrb.g().h();
    this.j = paramrb.i().h();
    this.f = paramrb.e().f().h();
    if (!sb.e) {}
    this.l = (this.f > 0);
  }
  
  protected double a(h paramh)
  {
    boolean bool3 = sb.e;
    if (!this.l) {
      return 0.0D;
    }
    double d = 0.0D;
    if ((bool3) || (paramh.b() != null))
    {
      mb localmb1 = paramh.a();
      mb localmb2 = paramh.b().a();
      boolean bool1 = a(localmb1);
      boolean bool2 = a(localmb2);
      if ((bool3) || ((bool1) || (bool2))) {
        d += this.f;
      }
    }
    return d;
  }
  
  double[] a(h paramh, mb parammb, jb[] paramArrayOfjb, m[] paramArrayOfm, double[] paramArrayOfDouble)
  {
    boolean bool = sb.e;
    if (!bool)
    {
      if (!this.l) {
        b("punish minimal group node to edge distance", 0.0D, false);
      }
    }
    else {
      return new double[paramArrayOfjb.length];
    }
    double d = 0.0D;
    if (!bool) {
      if (a(paramh, parammb)) {
        d = this.f;
      }
    }
    double[] arrayOfDouble = new double[paramArrayOfjb.length];
    if (!bool)
    {
      if (d > 0.0D) {
        Arrays.fill(arrayOfDouble, d);
      }
      b("punish minimal group node to edge distance", d, false);
    }
    return arrayOfDouble;
  }
  
  private boolean a(mb parammb)
  {
    Iterator localIterator = b(parammb).iterator();
    while (localIterator.hasNext())
    {
      e locale = (e)localIterator.next();
      if ((this.k.e(locale)) && (locale != this.g)) {
        return true;
      }
    }
    return false;
  }
  
  private boolean a(h paramh, mb parammb)
  {
    boolean bool3 = sb.e;
    mb localmb = paramh.a();
    List localList1 = c(localmb);
    List localList2 = b(localmb);
    List localList3 = b(parammb);
    e locale1 = a(localList2, localList3, localList1);
    if (locale1 != null)
    {
      if (bool3) {
        break label65;
      }
      if (!a(locale1)) {
        return true;
      }
    }
    label65:
    List localList4 = c(parammb);
    e locale2 = b(localList2, localList3, localList4);
    if (locale2 != null)
    {
      boolean bool1 = b(locale2);
      boolean bool2 = a(locale2);
      if (!bool3) {}
      int m = (!bool2) || ((!bool3) && ((bool2) && (locale2 == this.g))) || ((bool1) && (locale2 == this.h)) ? 1 : 0;
      if (bool3) {
        break label167;
      }
      if (m == 0) {
        return true;
      }
    }
    label167:
    return false;
  }
  
  private boolean a(e parame)
  {
    return a(this.j, parame);
  }
  
  private boolean b(e parame)
  {
    return a(this.i, parame);
  }
  
  private boolean a(t paramt, e parame)
  {
    double d = a().c().n();
    t localt1 = a().a().v(parame);
    t localt2 = new t(localt1.d() - d, localt1.e() - d, localt1.b() + 2.0D * d, localt1.c() + 2.0D * d);
    return localt2.b(paramt);
  }
  
  private e a(List paramList1, List paramList2, List paramList3)
  {
    boolean bool = sb.e;
    Iterator localIterator = paramList2.iterator();
    while (localIterator.hasNext())
    {
      e locale = (e)localIterator.next();
      if ((this.k.e(locale)) && ((bool) || (!paramList1.contains(locale)))) {
        if (!bool) {
          if (!paramList3.contains(locale)) {
            return locale;
          }
        }
      }
    }
    return null;
  }
  
  private e b(List paramList1, List paramList2, List paramList3)
  {
    boolean bool = sb.e;
    Iterator localIterator = paramList1.iterator();
    while (localIterator.hasNext())
    {
      e locale = (e)localIterator.next();
      if ((this.k.e(locale)) && ((bool) || (!paramList2.contains(locale)))) {
        if (!bool) {
          if (!paramList3.contains(locale)) {
            return locale;
          }
        }
      }
    }
    return null;
  }
  
  private List b(mb parammb)
  {
    return (List)parammb.a(nb.b);
  }
  
  private List c(mb parammb)
  {
    return (List)parammb.a(nb.a);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.a.ac

 * JD-Core Version:    0.7.0.1

 */